package ar.com.javiproyects.polla.dao.core;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import javax.ejb.Local;
import javax.persistence.EntityManager;
import javax.persistence.Query;

@Local
public interface DAOLocal<E, PK> {

	public void remove(E object) ;

	public E save(E object);

	public E getById(PK id);
	
	public List<E> getByIds(List<PK> ids);

	public List<E> getAll();

	public List<E> getAllOrderBy(String nameAttribute);

	public void persist(E object);

	public void save(Collection<E> objectList);

	public void removeById(PK id);

	public List<E> getBy(Map<String, ? extends Object> parametros);

	public List<E> executeListResultQuery(Query query) ;

	public E executeSingleResultQuery(Query query) ;
	
	public E getReferenceById(PK id);

	public EntityManager getEntityManager() ;

}